import QtQuick 2.0


Item {
    width: parent.width
    height: empresas.height

    ListView {
        id: empresas
        width: parent.width
        height: 160
        spacing: 25

        delegate: Item {
            width: empresas.width
            height: 40
            Column {
                width: empresas.width
                spacing: 2

                Rectangle {
                    width: parent.width
                    height: firstItem ? 0 : 1
                    color: "grey"
                }

                Text {
                    text: name
                    font.bold: true
                    font.pixelSize: 22
                }

                Text {
                    text: "<b>Qtd. Itens:</b> " + qtdItens
                    font.pixelSize: 14
                    color: "grey"
                }

                Text {
                    text: "<b>Dist.:</b> " + dist
                    font.pixelSize: 14
                    color: "grey"
                }

            }
        }
        model: ListModel {
            ListElement {
                name: "Empresa 1"
                dist: "10 km"
                qtdItens: 10
                firstItem: true
            }

            ListElement {
                name: "Empresa 2"
                dist: "10 km"
                qtdItens: 10
            }

            ListElement {
                name: "Empresa 3"
                dist: "10 km"
                qtdItens: 10
            }

            ListElement {
                name: "Empresa 4"
                dist: "10 km"
                qtdItens: 10
            }
        }
    }
}
